﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using myWindowsMediaPlayer.Model;

namespace myWindowsMediaPlayer.ViewModel
{
    class pictureViewModel : viewModelBase, interfaceMediaViewModel
    {
        private readonly pictureModel picture;
        private TimeSpan duration;

        public pictureViewModel(pictureModel picture)
        {
            if (picture != null)
                this.picture = picture;
            duration = new TimeSpan(0,0,10);
        }

        public pictureModel Picture
        {
            get { return this.picture; }
        }

        public string Name
        {
            get { return this.picture.Name; }
            set 
            {
                this.picture.Name = value;
                OnPropertyChanged("pictureName");
            }
        }

        public string Path
        {
            get { return this.picture.Path; }
            set
            {
                this.picture.Path = value;
                OnPropertyChanged("picturePath");
            }
        }

        public string Size
        {
            get { return this.picture.Size; }
            set
            {
                this.picture.Size = value;
                OnPropertyChanged("pictureSize");
            }
        }

        public DateTime Date
        {
            get { return this.picture.Date; }
            set
            {
                this.picture.Date = value;
                OnPropertyChanged("pictureDate");
            }
        }

        public TimeSpan Duration
        {
            get { return duration; }
        }

        private int id
        {
            get { return this.picture.Id; }
            set
            {
                this.picture.Id = value;
                OnPropertyChanged("pictureId");
            }
        }
    }
}
